Axioms for control operators in the CPS hierarchy
نویسنده
چکیده
A CPS translation is a syntactic translation of programs, which is useful for describing their operational behavior. By iterating the standard callby-value CPS translation, Danvy and Filinski discovered the CPS hierarchy and proposed a family of control operators, shift and reset, that make it possible to capture successive delimited continuations in a CPS hierarchy. Although shift and reset have found their applications in several areas such as partial evaluation, most studies in the literature have been devoted to the base level of the hierarchy, namely, to level-1 shift and reset. In this article, we investigate the whole family of shift and reset. We give a simple calculus with level-n shift and level-n reset for an arbitrary n > 0. We then give a set of equational axioms for them, and prove that these axioms are sound and complete with respect to the CPS translation. The resulting set of axioms is concise and a natural extension of those for level-1 shift and reset.
منابع مشابه
Axioms for Delimited Continuations in the CPS Hierarchy
A CPS translation is a syntactic translation of programs, which is useful for describing their operational behavior. By iterating the standard call-by-value CPS translation, Danvy and Filinski discovered the CPS hierarchy and proposed a family of control operators, shift and reset, that make it possible to capture successive delimited continuations in a CPS hierarchy. Although shift and reset h...
متن کاملA Call-by-Name CPS Hierarchy
The Continuation-Passing-Style (CPS) translation gives semantics to control operators such as exception and first-class continuations. By iterating this translation, Danvy and Filinski obtained a CPS hierarchy, and used it to specify a series of control operators, hierarchical (or layered) delimited-control operators, We introduce a call-by-name variant of the CPS hierarchy. While most of the w...
متن کاملA Dynamic Interpretation of the CPS Hierarchy
The CPS hierarchy of control operators shifti/reseti of Danvy and Filinski is a natural generalization of the shift and reset static control operators that allow for abstracting delimited control in a structured and CPS-guided manner. In this article we show that a dynamic variant of shift/reset, known as shift0/reset0, where the discipline of static access to the stack of delimited continuatio...
متن کاملAn Operational Foundation for Delimited Continuations in the CPS Hierarchy
We present an abstract machine and a reduction semantics for the λ-calculus extended with control operators that give access to delimited continuations in the CPS hierarchy. The abstract machine is derived from an evaluator in continuation-passing style (CPS); the reduction semantics (i.e., a small-step operational semantics with an explicit representation of evaluation contexts) is constructed...
متن کاملThe Theory and Practice of Programming Languages with Delimited Continuations
This dissertation presents a study of functional programming languages with first-class delimited continuations. We focus mainly on theoretical and practical aspects of Danvy and Filinski’s hierarchy of static delimited-control operators shiftn and resetn, and of Felleisen’s dynamic delimited-control operators control and prompt. Our study uses the traditional means of specifying semantics of f...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید
ثبت ناماگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید
ورودعنوان ژورنال:
- Higher-Order and Symbolic Computation
دوره 20 شماره
صفحات -
تاریخ انتشار 2007